import Vue from 'vue'
import App from './App'
import api from '@/api/api.js'
import global from '@/config/index.config.js'
import tool from '@/tool/tool.js'
import update from '@/tool/update.js'


Vue.config.productionTip = false

Vue.prototype.$msg = tool.msg
Vue.prototype.$api = api
Vue.prototype.$global = global
Vue.prototype.$tool = tool
Vue.prototype.$update = update

import uniNavBar from '@/components/uni-nav-bar/uni-nav-bar.vue'
import empty from '@/components/empty.vue'
/* confirm组件 */
import modalConfirm from '@/components/mycomponents/modal-confirm.vue'
import payPassword from '@/components/mycomponents/pay-password.vue'

Vue.component('uniNavBar',uniNavBar);
Vue.component('empty',empty);
Vue.component('modalConfirm',modalConfirm);
Vue.component('payPassword',payPassword);

// import Vconsole from 'vconsole'
// const vConsole = new Vconsole()
// Vue.use(vConsole)


/* 自定义头部导航 返回事件 */
Vue.prototype.goBack = function() {
	//#ifdef H5
	history.back();
	//#endif

	//#ifndef H5
	uni.navigateBack();
	//#endif
}
/* 跳转事件 */
Vue.prototype.jump = function(url){
	uni.navigateTo({
		url:url
	})
}
Vue.prototype.sjump = function(url){
	uni.switchTab({
		url:url
	})
}

App.mpType = 'app'

const app = new Vue({
	...App
})
app.$mount()
